﻿cmake_minimum_required(VERSION 3.4)

set(TARGET Ch06_Box)
project(${TARGET})

set(FX_FILES 
    FX/color.fx
)

source_group(Fx FILES ${FX_FILES})

add_executable(${TARGET}
    ${FX_FILES}
    BoxDemo.cpp
)

add_custom_command(TARGET ${TARGET} POST_BUILD
    COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR}/FX ${CMAKE_CURRENT_BINARY_DIR}/FX
    COMMAND ${CMAKE_COMMAND} -E copy_if_different $<TARGET_FILE:${TARGET}> ${CMAKE_CURRENT_BINARY_DIR}
)
